import 'package:get/get.dart';

import '../../../services/address.dart';
import '../../../services/dio_manager.dart';
import '../personnel_model.dart';

class DepartMentController extends GetxController{

  DepartmentModel? model;

  /// 获取部门树
  requestDataWithHrDepartment() async {
    var json = await DioManager().kkRequest(Address.hrDepartment, method: 'get');
    DepartmentModel _model = DepartmentModel.fromJson(json);
    model = _model;
    update();
  }
  @override
  void onInit() {
    // TODO: implement onInit
    super.onInit();
    requestDataWithHrDepartment();
  }
}